import request from '@/utils/request'

// 查询摄像头信息列表
export function listInfo(query) {
  return request({
    url: '/camera/info/list',
    method: 'get',
    params: query
  })
}
//图像顶位详情页信息
export function getImageInfo(id){
  return request({
    url: '/combat/geoResult/list?geoId=' + id,
    method: 'get'
  })
}

// 查询摄像头数量
export function getTotal() {
  return request({
    url: '/camera/info/getCameraNum',
    method: 'get'
  })
}

// 查询摄像头信息详细
export function getInfo(id) {
  return request({
    url: '/camera/info/' + id,
    method: 'get'
  })
}

// 新增摄像头信息
export function addInfo(data) {
  return request({
    url: '/camera/info',
    method: 'post',
    data: data
  })
}

// 修改摄像头信息
export function updateInfo(data) {
  return request({
    url: '/camera/info',
    method: 'put',
    data: data
  })
}

// 删除摄像头信息
export function delInfo(id) {
  return request({
    url: '/camera/info/' + id,
    method: 'delete'
  })
}
//图谱
export function getGraph(data){
  return request({
    url: '/camera/info/graph',
    method: 'post',
    data:data
  })
}
//图谱new
export function getGraphNew(data){
  return request({
    url: '/camera/info/graphNew',
    method: 'post',
    data:data
  })
}
//摄像头地区统计
export function getArea(){
  return request({
    url: '/camera/info/area',
    method: 'get',
  })
}

//摄像头漏洞类型统计
export function getLoopholeType(){
  return request({
    url: '/camera/info/loopholeType',
    method: 'get',
  })
}

//课题六：摄像头位置分析-摄像头异常检测信息

export function getExceptionList(query){
  return request({
    url: '/camera/exception/list',
    method: 'get',
    params: query
  })
}

// 获取摄像头算法定位结果
export function getCameraAlgorithmResult(id) {
  return request({
    url: '/camera/info/getCameraAddress?id=' + id,
    method: 'get',
  })
} 
// 获取摄像头算法定位结果
export function getWarnStatistics(){
  return request({
    url: '/system/warn/statistics',
    method: 'get',
  })
}
